package com.tianlang.model.dto;

import com.jfinal.plugin.activerecord.Record;

/**
 * Face Model https://console.faceplusplus.com.cn/documents/4888373
 * 
 */
public class FaceV3 extends Record implements Comparable<FaceV3> {
	private static final long serialVersionUID = -4555142616164160942L;

	/**faceToken被检测出的每一张人脸都在Face++系统中的标识符**/
	/**top(int)人脸矩形框纵坐标**/
	/**left(int)人脸矩形框横坐标**/
	/**gender性别：Male/Female**/
	/**age(int)年龄估计值**/
	/**ethnicity人种：Asian/White/Black**/

	/**
	 * 根据人脸中心点坐标从左至右排序
	 */
	@Override
	public int compareTo(FaceV3 face) {
		int result = 0;
		if (this.getInt("left") > face.getInt("left")) {
			result = 1;
		} else {
			result = -1;
		}
		return result;
	}
}
